from django.test import TestCase

# Create your tests here.
import unittest

def my_func(a_list,idx):
    return a_list[idx]
    
class MyFuncTestCase(unittest.TestCase):
    def testBasic(self):
        a = ['larry','curly','more']
        self.assertEqual(my_func(a,0), 'larry')
#         self.assertEqual(my_func(a,2   ), 'fuck', '>>>>msg')
        
import datetime

from django.utils import timezone
from django.test import TestCase

from polls.models import Poll

class PollMethodTests(TestCase):

    def test_was_published_recently_with_future_poll(self):
        """
        was_published_recently() should return False for polls whose
        pub_date is in the future
        """
        future_poll = Poll(pub_date=timezone.now() + datetime.timedelta(days=30))
        self.assertEqual(future_poll.was_published_recently(), False)
